<?php htmlTemplate('admin_header_frame.php');?>
<div class="title">添加区块内容
</div>
<script>
function winreload(){
	
	window.location.reload();
}
function  delItems()
{
	var items = getCheckItems();
	if(!items){
		parent.showAlert('请选择要删除文章！');
		return false;
	}
	var url = '<?php echo MVC_WWW_HOST;?>admin/section/datadel/id/'+items;
	getUrl(url,1,1);
}
</script>
<table width="100%" cellspacing="1" cellpadding="3" id="listTable">
	<tr >
	
		<td colspan="4"><input type="button" value="添 加" onclick="showFrame('<?php echo MVC_WWW_HOST.'admin/section/addSectiondata/sectionid/'.$_GET['sectionid'];?>',760,440); ">
		</td>
	</tr>
		
	<tr>
			<td >&nbsp;&nbsp;<input type="checkbox" onclick="checkAllBox(this);">
			</td>
			<td align="left" style="font-weight: bold;color:#005EAC;">&nbsp;&nbsp;文章标题
			</td>
			<td  > 排序
			</td>
			<td align="right"> 操作&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			</td>
			
	</tr>
	<?php foreach ($rs['list'] as $key=>$value ):?>	
		
		<tr >
			<td>&nbsp;&nbsp;<input type="checkbox" class="checkitem" value="<?php echo $value['id'];?>">
			</td>
			<td>&nbsp;&nbsp;
			<?php echo $value['title'];?>
			</td>
			<td>&nbsp;&nbsp;
			<?php echo $value['sorts'];?>
			</td>
			<td align="right">			
			<a title="打开地址" href="<?php echo $value['url'];?>" target="_blank"><img  src="<?php echo MVC_WWW_HOST.'img/view.gif'?>" /></a>				
			<a title="修改" href="javascript:;" onclick="showFrame('<?php echo MVC_WWW_HOST.'admin/section/datamodify/id/'.$value['id'];?>',760,540);"><img  src="<?php echo MVC_WWW_HOST.'img/edit.gif'?>" /></a>
		<a title="删除" href="javascript:;"><img onclick="getUrl('<?php echo MVC_WWW_HOST.'admin/section/datadel/id/'.$value['id'];?>',1,1)"  src="<?php echo MVC_WWW_HOST.'img/delete.gif'?>" /></a>
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			</td>
		</tr>	
	<?php endforeach;?>
	<tr style="background:#f4fafb;">
		<td align="left" colspan="9">
		<div style="float:left">
		&nbsp;&nbsp;&nbsp;		
		<input type="button" value="删除" onclick="delItems();"/> <br>

		</div>
		<div style="float:right"><?php echo $rs['html'];?>&nbsp;&nbsp;&nbsp;&nbsp;</div>
		</td>
	</tr>
	<tr><td  colspan="4" style="color:green" align="center">区块：<?php echo $section['name'].'  &nbsp;&nbsp; 说明：'.$section['memo'];?></td></tr>
	</table>
